<template>
  <div class="app">
    <cateGory title="美食" :listData="foods">
      <img src="https://s3.ax1x.com/2021/01/16/srJlq0.jpg" alt="" />
      <a slot="footer" href="#">美食</a>
    </cateGory>

    <cateGory title="游戏" :listData="games">
      <ul slot="center">
        <li v-for="(g, index) in games" :key="index">{{ g }}</li>
      </ul>
      <div class="foot" slot="footer">
        <a href="#">单机游戏</a>
        <a href="#">单机游戏</a>
      </div>
    </cateGory>

    <cateGory title="电影">
      <video
        slot="center"
        controls
        src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"
      ></video>
      <template v-slot:footer>
        <!-- 只有template才能这样写 -->
        <div class="foot">
          <a href="#">经典</a>
          <a href="#">2024</a>
          <a href="#">热们</a>
        </div>
        <h4>欢迎观影</h4>
      </template>
    </cateGory>
  </div>
</template>
<script>
// 引入组件
import cateGory from "./components/cateGory.vue";

export default {
  name: "App",
  components: {
    cateGory,
  },
  data() {
    return {
      foods: ["火锅", "烧烤", "小龙虾", "牛排"],
      games: ["红色警戒", "穿越火线", "劲舞团", "超级玛丽"],
      films: ["《教父》", "《拆弹专家》", "《你好，李焕英》", "《尚硅谷》"],
    };
  },
};
</script>
<style>
.app,
.foot {
  display: flex;
  justify-content: space-around;
}
video {
  width: 100%;
}
img {
  width: 100%;
}
</style>
